package com.usian.user.controller;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.dtos.LoginDto;
import com.usian.user.ApUserLoginControllerApi;
import com.usian.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/login")
public class ApUserLoginController implements ApUserLoginControllerApi {

    @Autowired
    private ApUserService apUserService;


    /**
     * app c端用户登录
     *
     * @param dto/
     * @return
     */
    @Override
    @PostMapping("/login_auth")
    public ResponseResult login(@RequestBody LoginDto dto) {
        return apUserService.login(dto);
    }
}
